<?php


namespace app\model;



class Admin extends BaseModel
{
    protected $hidden = [
        'password', 'salt'
    ];
    
    public function validatePassword(String $password)
    {
        return $this->password == md5(md5($password).md5($this->salt));
    }
}